import React from 'react';
import './style.less';

export default ({onSearch}) => {
  let inpElem = null;
  return (
    <div className="search-input">
      <i className='icon iconfont icon-search' onClick={() => onSearch(inpElem.value.trim())}/><input type="text" placeholder="请输入关键字" ref={(inp) => inpElem = inp}/>
    </div>
  )
}